package com.vdg.dialog;

import com.vdg.R;
import com.vdg.fps.ui.view.TextViewPlus;

import android.content.Context;
import android.view.View;
import android.view.View.OnClickListener;

public class MenuDialog extends QuickDialog {
	OnDialogSelectedItemListener mOnDialogSelectedItemListener;
	private TextViewPlus mTxvFetchGroups;
	private TextViewPlus mTxvFetchFriends;
	private TextViewPlus mTxvFetchLikedPages;
	private TextViewPlus mTxvYourPages;
	private TextViewPlus mTxvPostMessage;
	private TextViewPlus mTxvSendPrivate;

	public MenuDialog(Context context, OnDialogSelectedItemListener listener) {
		super(context, R.layout.menu_dialog_layout);
		this.mOnDialogSelectedItemListener = listener;
		mTxvFetchGroups = (TextViewPlus) getRootView().findViewById(
				R.id.txv_fetch_groups_list);
		mTxvFetchFriends = (TextViewPlus) getRootView().findViewById(
				R.id.txv_fetch_friends_list);
		mTxvFetchLikedPages = (TextViewPlus) getRootView().findViewById(
				R.id.txv_liked_pages);
		mTxvYourPages = (TextViewPlus) getRootView().findViewById(
				R.id.txv_fetch_your_pages);
		mTxvPostMessage = (TextViewPlus) getRootView().findViewById(
				R.id.txv_post_message);
		mTxvSendPrivate = (TextViewPlus) getRootView().findViewById(
				R.id.txv_send_private);
		mTxvSendPrivate.setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				mOnDialogSelectedItemListener.onSelectedSendPrivate();
				MenuDialog.this.dismiss();
			}
		});
		mTxvPostMessage.setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				mOnDialogSelectedItemListener.onSelectedPostMessage();
				MenuDialog.this.dismiss();
			}
		});
		mTxvFetchGroups.setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				mOnDialogSelectedItemListener.onSelectedFetchGroupsList();
				MenuDialog.this.dismiss();
			}
		});
		mTxvFetchFriends.setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				mOnDialogSelectedItemListener.onSelectedFetchFriendsList();
				MenuDialog.this.dismiss();
			}
		});
		mTxvFetchLikedPages.setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				mOnDialogSelectedItemListener.onSelectedFetchLikedPages();
				MenuDialog.this.dismiss();
			}
		});
		mTxvYourPages.setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				mOnDialogSelectedItemListener.onSelectedYourPages();
				MenuDialog.this.dismiss();
			}
		});
		// TODO Auto-generated constructor stub
	}

	public interface OnDialogSelectedItemListener {
		public void onSelectedFetchFriendsList();

		public void onSelectedFetchGroupsList();

		public void onSelectedFetchLikedPages();

		public void onSelectedYourPages();

		public void onSelectedPostMessage();

		public void onSelectedSendPrivate();
	}
}
